/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       viewport.cpp
 * Author:     karooolek
 * Created on: Oct 15, 2009
 *
 **********************************************************************************************************************/

#include "viewport.h"

namespace mGameEngine
{
namespace Graphics
{

Viewport::Viewport() : 
    RenderTarget(),
    _position()
{
}

Viewport::Viewport(const Vector2 &position, const Vector2 &size) :
    RenderTarget(),
    _position(position)
{
    _size = size;
}

Viewport::~Viewport()
{
}

void Viewport::beginRendering()
{
    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
    glViewport(int(_position.x), int(_position.y), int(_size.x), int(_size.y));
}

void Viewport::endRendering()
{
}

}
}

